Optimal. Leaf size=248 \[ \frac {2 b^2 f m n^2 \log (x)}{e}-\frac {2 b f m n \log \left (1+\frac {e}{f x}\right ) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {f m \log \left (1+\frac {e}{f x}\right ) \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {2 b^2 f m n^2 \log (e+f x)}{e}-\frac {2 b^2 n^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x}+\frac {2 b^2 f m n^2 \text {Li}_2\left (-\frac {e}{f x}\right )}{e}+\frac {2 b f m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {e}{f x}\right )}{e}+\frac {2 b^2 f m n^2 \text {Li}_3\left (-\frac {e}{f x}\right )}{e} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.20, antiderivative size = 248, normalized size of antiderivative = 1.00, number of steps
used = 10, number of rules used = 10, integrand size = 26, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.385, Rules used = {2342, 2341,
2425, 36, 29, 31, 2379, 2438, 2421, 6724} \begin {gather*} \frac {2 b f m n \text {PolyLog}\left (2,-\frac {e}{f x}\right ) \left (a+b \log \left (c x^n\right )\right )}{e}+\frac {2 b^2 f m n^2 \text {PolyLog}\left (2,-\frac {e}{f x}\right )}{e}+\frac {2 b^2 f m n^2 \text {PolyLog}\left (3,-\frac {e}{f x}\right )}{e}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b f m n \log \left (\frac {e}{f x}+1\right ) \left (a+b \log \left (c x^n\right )\right )}{e}-\frac {f m \log \left (\frac {e}{f x}+1\right ) \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {2 b^2 n^2 \log \left (d (e+f x)^m\right )}{x}+\frac {2 b^2 f m n^2 \log (x)}{e}-\frac {2 b^2 f m n^2 \log (e+f x)}{e} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 29
Rule 31
Rule 36
Rule 2341
Rule 2342
Rule 2379
Rule 2421
Rule 2425
Rule 2438
Rule 6724
Rubi steps
\begin {align*} \int \frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x^2} \, dx &=-\frac {2 b^2 n^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x}-(f m) \int \left (-\frac {2 b^2 n^2}{x (e+f x)}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right )}{x (e+f x)}-\frac {\left (a+b \log \left (c x^n\right )\right )^2}{x (e+f x)}\right ) \, dx\\ &=-\frac {2 b^2 n^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x}+(f m) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x (e+f x)} \, dx+(2 b f m n) \int \frac {a+b \log \left (c x^n\right )}{x (e+f x)} \, dx+\left (2 b^2 f m n^2\right ) \int \frac {1}{x (e+f x)} \, dx\\ &=-\frac {2 b^2 n^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x}+\frac {(f m) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x} \, dx}{e}-\frac {\left (f^2 m\right ) \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{e+f x} \, dx}{e}+\frac {(2 b f m n) \int \frac {a+b \log \left (c x^n\right )}{x} \, dx}{e}-\frac {\left (2 b f^2 m n\right ) \int \frac {a+b \log \left (c x^n\right )}{e+f x} \, dx}{e}+\frac {\left (2 b^2 f m n^2\right ) \int \frac {1}{x} \, dx}{e}-\frac {\left (2 b^2 f^2 m n^2\right ) \int \frac {1}{e+f x} \, dx}{e}\\ &=\frac {2 b^2 f m n^2 \log (x)}{e}+\frac {f m \left (a+b \log \left (c x^n\right )\right )^2}{e}-\frac {2 b^2 f m n^2 \log (e+f x)}{e}-\frac {2 b^2 n^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b f m n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{e}+\frac {(f m) \text {Subst}\left (\int x^2 \, dx,x,a+b \log \left (c x^n\right )\right )}{b e n}+\frac {(2 b f m n) \int \frac {\left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{x} \, dx}{e}+\frac {\left (2 b^2 f m n^2\right ) \int \frac {\log \left (1+\frac {f x}{e}\right )}{x} \, dx}{e}\\ &=\frac {2 b^2 f m n^2 \log (x)}{e}+\frac {f m \left (a+b \log \left (c x^n\right )\right )^2}{e}+\frac {f m \left (a+b \log \left (c x^n\right )\right )^3}{3 b e n}-\frac {2 b^2 f m n^2 \log (e+f x)}{e}-\frac {2 b^2 n^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b f m n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{e}-\frac {2 b^2 f m n^2 \text {Li}_2\left (-\frac {f x}{e}\right )}{e}-\frac {2 b f m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )}{e}+\frac {\left (2 b^2 f m n^2\right ) \int \frac {\text {Li}_2\left (-\frac {f x}{e}\right )}{x} \, dx}{e}\\ &=\frac {2 b^2 f m n^2 \log (x)}{e}+\frac {f m \left (a+b \log \left (c x^n\right )\right )^2}{e}+\frac {f m \left (a+b \log \left (c x^n\right )\right )^3}{3 b e n}-\frac {2 b^2 f m n^2 \log (e+f x)}{e}-\frac {2 b^2 n^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b n \left (a+b \log \left (c x^n\right )\right ) \log \left (d (e+f x)^m\right )}{x}-\frac {\left (a+b \log \left (c x^n\right )\right )^2 \log \left (d (e+f x)^m\right )}{x}-\frac {2 b f m n \left (a+b \log \left (c x^n\right )\right ) \log \left (1+\frac {f x}{e}\right )}{e}-\frac {f m \left (a+b \log \left (c x^n\right )\right )^2 \log \left (1+\frac {f x}{e}\right )}{e}-\frac {2 b^2 f m n^2 \text {Li}_2\left (-\frac {f x}{e}\right )}{e}-\frac {2 b f m n \left (a+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )}{e}+\frac {2 b^2 f m n^2 \text {Li}_3\left (-\frac {f x}{e}\right )}{e}\\ \end {align*}
________________________________________________________________________________________
Mathematica [B] Leaf count is larger than twice the leaf count of optimal. \(600\) vs. \(2(248)=496\).
time = 0.21, size = 600, normalized size = 2.42 \begin {gather*} -\frac {-3 a^2 f m x \log (x)-6 a b f m n x \log (x)-6 b^2 f m n^2 x \log (x)+3 a b f m n x \log ^2(x)+3 b^2 f m n^2 x \log ^2(x)-b^2 f m n^2 x \log ^3(x)-6 a b f m x \log (x) \log \left (c x^n\right )-6 b^2 f m n x \log (x) \log \left (c x^n\right )+3 b^2 f m n x \log ^2(x) \log \left (c x^n\right )-3 b^2 f m x \log (x) \log ^2\left (c x^n\right )+3 a^2 f m x \log (e+f x)+6 a b f m n x \log (e+f x)+6 b^2 f m n^2 x \log (e+f x)-6 a b f m n x \log (x) \log (e+f x)-6 b^2 f m n^2 x \log (x) \log (e+f x)+3 b^2 f m n^2 x \log ^2(x) \log (e+f x)+6 a b f m x \log \left (c x^n\right ) \log (e+f x)+6 b^2 f m n x \log \left (c x^n\right ) \log (e+f x)-6 b^2 f m n x \log (x) \log \left (c x^n\right ) \log (e+f x)+3 b^2 f m x \log ^2\left (c x^n\right ) \log (e+f x)+3 a^2 e \log \left (d (e+f x)^m\right )+6 a b e n \log \left (d (e+f x)^m\right )+6 b^2 e n^2 \log \left (d (e+f x)^m\right )+6 a b e \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+6 b^2 e n \log \left (c x^n\right ) \log \left (d (e+f x)^m\right )+3 b^2 e \log ^2\left (c x^n\right ) \log \left (d (e+f x)^m\right )+6 a b f m n x \log (x) \log \left (1+\frac {f x}{e}\right )+6 b^2 f m n^2 x \log (x) \log \left (1+\frac {f x}{e}\right )-3 b^2 f m n^2 x \log ^2(x) \log \left (1+\frac {f x}{e}\right )+6 b^2 f m n x \log (x) \log \left (c x^n\right ) \log \left (1+\frac {f x}{e}\right )+6 b f m n x \left (a+b n+b \log \left (c x^n\right )\right ) \text {Li}_2\left (-\frac {f x}{e}\right )-6 b^2 f m n^2 x \text {Li}_3\left (-\frac {f x}{e}\right )}{3 e x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
4.
time = 0.53, size = 10967, normalized size = 44.22
method | result | size |
risch | \(\text {Expression too large to display}\) | \(10967\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] Timed out
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Timed out} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int \frac {\ln \left (d\,{\left (e+f\,x\right )}^m\right )\,{\left (a+b\,\ln \left (c\,x^n\right )\right )}^2}{x^2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________